body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 70%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background-color: #3385ff;
    color: white;
    padding: 10px 0;
    margin-bottom: 20px;
}

.header h1 {
    margin: 0;
}

.footer {
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid #ddd;
    text-align: center;
    color: #666;
}

.post-list h2 {
    border-bottom: 2px solid #3385ff;
    padding-bottom: 10px;
}

.post-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.post-table th, .post-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.post-table th {
    background-color: #f2f2f2;
}

.post-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.post-table a {
    color: #3385ff;
    text-decoration: none;
}

.post-table a:hover {
    text-decoration: underline;
}

.post-detail h1 {
    color: #333;
    margin-bottom: 10px;
}

.post-meta {
    margin-bottom: 20px;
    color: #666;
    font-size: 0.9em;
}

.post-meta span {
    margin-right: 15px;
}

.floor {
    border: 1px solid #ddd;
    margin-bottom: 15px;
    background-color: white;
    border-radius: 4px;
    overflow: hidden;
}

.floor-header {
    background-color: #f5f5f5;
    padding: 8px 15px;
    border-bottom: 1px solid #ddd;
}

.floor-num {
    font-weight: bold;
    margin-right: 15px;
}

.floor-content {
    padding: 15px;
}

.images {
    margin-top: 10px;
}

.images img {
    max-width: 100%;
    height: auto;
    margin-right: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
}

.gua-data {
    margin-top: 30px;
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.gua-data h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.gua-data table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.gua-data th, .gua-data td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.gua-data th {
    background-color: #f2f2f2;
}

/* 添加在原有样式之后 */

.sub-replies {
    margin-top: 15px;
    padding-left: 30px;
    border-left: 3px solid #eee;
}

.sub-reply {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.sub-reply-header {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
}

.sub-reply-content {
    font-size: 0.9em;
    line-height: 1.5;
}
/* 导航栏样式 */
.header {
    background-color: #3385ff;
    color: white;
    padding: 15px 0;
    position: relative;
}

.main-nav {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.main-nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.main-nav a:hover {
    background-color: rgba(255,255,255,0.2);
}
/* 添加搜索相关样式 */
.search-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary {
    background-color: #3385ff;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    margin-left: 10px;
}

.error-container {
    text-align: center;
    margin-top: 50px;
}

.error-message {
    color: #dc3545;
    margin: 20px 0;
}

/* 分页部分*/
.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    list-style: none; /* 清除默认列表样式 */
    padding-left: 0;
}

.pagination .page-item {
    display: inline-block; /* 每个分页项单独显示为块级内联元素 */
    margin: 0 4px;
}

.page-item.active .page-link {
    background-color: #3385ff;
    border-color: #3385ff;
    color: white;
}

.page-link {
    color: #3385ff;
    cursor: pointer;
    padding: 6px 12px; /* 增加内边距 */
    border: 1px solid #ddd;
    border-radius: 4px;
}

.page-item.disabled .page-link {
    color: #999;
    pointer-events: none;
}

/* 添加省略号样式 */
.pagination .ellipsis {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    cursor: default;
}

/* 分页跳转样式 */
.page-jump {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
}

.page-jump .form-inline {
    display: flex;
    align-items: center;
}

.page-jump input[type="number"] {
    width: 80px;
    padding: 4px 8px;
    margin-right: 8px;
    font-size: 0.9rem;
}

.page-jump button {
    padding: 4px 12px;
    font-size: 0.9rem;
}

/* 卡片式帖子列表 */
.post-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    display: grid;
    grid-template-columns: 120px 1fr 120px 120px;
    align-items: center;
    padding: 16px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #eee;
    overflow: hidden;
}

.post-card:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* 第1栏：统计数字 */
.post-stats {
    border: 1px solid #ddd;
    padding: 10px 8px;
    text-align: center;
    font-size: 0.9em;
    border-radius: 6px;
    min-width: 100px;
    background-color: #f9f9f9;
    transition: background-color 0.3s;
}

.post-card:hover .post-stats {
    background-color: #eef6ff;
}

/* 第2栏：标题区域 */
.post-title-container {
    padding: 0 12px; /* 控制与左侧 .post-stats 的间距 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    min-width: 200px; /* 可根据实际调整 */
}
.title-link {
    font-size: 1.1em;
    color: #3385ff;
    text-decoration: none;
    font-weight: bold;
    display: block;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}


.title-link:hover {
    text-decoration: underline;
}

.title-summary {
    margin-top: 6px;
    font-size: 0.85em;
    color: #888;
    line-height: 1.4;
    display: -webkit-line-clamp;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

/* 第3栏：作者 */
.post-author {
    font-size: 0.95em;
    color: #333;
    text-align: center;
}

/* 第4栏：时间 */
.post-time {
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

@media (max-width: 992px) {
    .post-card {
        grid-template-columns: 1fr;
        padding: 12px;
        align-items: stretch;
        gap: 10px;
    }

    .title-summary {
        -webkit-line-clamp: 1;
    }
}

.search-bar {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    z-index: 10; /* 确保在其他内容之上 */
}

#searchField, #regexInput {
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* 当前筛选标签 */
.filter-tag {
    background-color: #e8f4ff;
    color: #333;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    display: inline-block;
    font-size: 0.95em;
    position: relative;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid #bde0ff;
}

.filter-tag .filter-tag-close {
    margin-left: 10px;
    color: #888;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2em;
    vertical-align: middle;
    line-height: 1;
}

.filter-tag .filter-tag-close:hover {
    color: #dc3545;
}
